package main

import "fmt"

type a2 struct {
	name   string
	Id     int
	coment string
}

func main() {
	var a string = "abcd"  //a中具有pair<statictype:string,value:"abcd">的键值对
	var a1 interface{} = a //将pair键值对一起带入
	str, _ := a1.(string)  //用断言获取a1中string类型的值
	fmt.Println(str)
	a3 := a2{"cat", 10, "dog"}
	fmt.Println(a3)
	var a4 interface{} = a3
	str1, _ := a4.(int)
	fmt.Println(str1)

}
